package com.xqb.listen.manager

import android.app.Activity
import com.xqb.listen.manager.media.model.MediaModel
import org.greenrobot.eventbus.EventBus

/**
 * author:17873
 * date:2025/2/1
 * des:EventBusManager
 **/
class EventBusManager {
    companion object{
        val singleInstance by lazy(LazyThreadSafetyMode.SYNCHRONIZED){ EventBusManager() }
    }

    sealed class Event{
        data class InitAudio(val mediaModel: MediaModel?) : Event()
    }

    fun register(activity: Activity){
        EventBus.getDefault().register(activity)
    }

    fun unRegister(activity: Activity){
        EventBus.getDefault().unregister(activity)
    }
}